﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace UniRlv.UI.Main.Widget
{
    public partial class FrmPrintParameter : Form
    {
        public int PrintQty { get; set; }
        public int PrintStation { get; set; }
        public FrmPrintParameter()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            PrintQty = (int)numericUpDown1.Value;
            PrintStation = comboBox1.SelectedIndex + 1;
            this.DialogResult = DialogResult.OK;
            Close();
        }

        private void FrmPrintParameter_Load(object sender, EventArgs e)
        {
            numericUpDown1.Value = PrintQty;
            comboBox1.SelectedIndex = PrintStation - 1;
        }

        private void FrmPrintParameter_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                btnOK.PerformClick();
            }
        }
    }
}
